package graduationorder.graduationorder.mapper;

import graduationorder.graduationorder.domain.Order;
import org.apache.ibatis.annotations.*;

import java.util.Date;
import java.util.List;

@Mapper
public interface OrdersMapper {

    Order selectByPrimaryKey(@Param("id") String id);

    List<Order> selectAllOrders();

    int insertOrder(@Param("orderId") String orderId, @Param("customerSource") String customerSource, @Param("serviceType") String serviceType, @Param("major") String major, @Param("title") String title, @Param("wordCount") Integer wordCount, @Param("orderDate") Date orderDate, @Param("dueDate") Date dueDate, @Param("additionalNotes") String additionalNotes, @Param("status") Integer status);


    List<Order> findOrdersByCriteria(@Param("orderId") String orderId,
                                     @Param("customerSource")String customerSource,
                                     @Param("serviceType")String serviceType,
                                     @Param("major")String major,
                                     @Param("title")String title,
                                     @Param("wordCount")Integer wordCount,
                                     @Param("orderDate") String orderDate,
                                     @Param("dueDate")String dueDate);

    int deleteOrderById(@Param("orderId") String orderId);

    int updateOrder(@Param("orderId") String orderId);//有问题，注意参数类型


}
